package com.crm.controller;

import com.crm.dto.BusinessDto;
import com.crm.dto.ClueGainDto;
import com.crm.dto.GetPoolDto;
import com.crm.dto.PoolDto;
import com.crm.result.PageResultTow;
import com.crm.result.Result;
import com.crm.service.PoolService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/business")
@Slf4j
@AllArgsConstructor
public class PoolController {
    private final PoolService poolService;
    @GetMapping("/pool")
    public PageResultTow getPoolList(PoolDto poolDto) {
        log.info("查询公海池");
        return poolService.getPollListByPage(poolDto);
    }
    @PutMapping("/gain")
    public Result putGain(@RequestBody GetPoolDto getPoolDto){
        poolService.putGain(getPoolDto);
        return Result.success();
    }

}
